<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean"  prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html"  prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"   prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" 	 prefix="fmt" %>
<%@ page import="grupobbva.pe.operhc.domain.SegUsuario"%>
<jsp:useBean id="now" class="java.util.Date" scope="request" />
<fmt:formatDate value="${now}" var="formattedDate" type="date" pattern="dd/MM/yyyy" />
<fmt:formatDate value="${now}" var="formattedTime" type="date" pattern="HH:mm:ss" />
<% SegUsuario usuarioSession = (SegUsuario)request.getSession().getAttribute("usuarioSession");%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>Ofertas - Gestor de Campañas</title>
	<link rel="stylesheet" type="text/css" media="screen" href="<%=request.getContextPath()%>/css/ui.jqgrid.css" />
	<link rel="stylesheet" type="text/css" media="screen" href="<%=request.getContextPath()%>/css/redmond/jquery-ui-1.8.2.custom.css" />
	<link rel="stylesheet" type="text/css" media="screen" href="<%=request.getContextPath()%>/css/operhc_style.css" />
	<link rel="stylesheet" type="text/css" media="print"  href="<%=request.getContextPath()%>/css/print.css" />
	<link rel="stylesheet" type="text/css" media="screen" href="<%=request.getContextPath()%>/css/buttonOHC.css" />
	
	<script type="text/javascript" src='<%= request.getContextPath()%>/dwr/interface/ConsultaActualAction.js'></script>
	<script type='text/javascript' src='<%= request.getContextPath()%>/dwr/engine.js'></script>
	<script type='text/javascript' src='<%= request.getContextPath()%>/dwr/util.js'></script>
	<script src="<%=request.getContextPath()%>/js/util/gridUtil.js" type="text/javascript"></script>
	<script src="<%=request.getContextPath()%>/js/jquery-1.7.1.js" type="text/javascript"></script>	
	<script src="<%=request.getContextPath()%>/js/i18n/grid.locale-es.js" type="text/javascript"></script>
	<script src="<%=request.getContextPath()%>/js/jquery.jqGrid.src.js" type="text/javascript"></script>
	<script src="<%=request.getContextPath()%>/js/grid.subgrid.js" type="text/javascript"></script>
	<script src="<%=request.getContextPath()%>/js/util/encabezado.js" type="text/javascript"></script>
	
</head>
<body>
<html:form styleId="formContrato" method="post" action="consultaActualForm.do?method=imprimirContratoGestorCampania">

<div style="font-size: xx-small; width: 100%; text-align: right;"><%=usuarioSession.getCodigo()%> | <c:out value="${sessionScope.usuarioHOST.oficinaPertenencia}"/> | <c:out value="${formattedDate}" /> | <c:out value="${formattedTime}" /></div>
<p />

<table align="center" width="100%" border="0" cellspacing="0" cellpadding="0">
	
<%--
	<tr>
	<td align="left">&nbsp;Cliente:</td>
	<td align="left">
	&nbsp;<span>DNI: <c:out value="${sessionScope.clienteSession.numeroDocumento}"/> - <c:out value="${sessionScope.clienteSession.razonSocial}"/></span>
	</td>
	</tr>
	
	<tr>
	<td align="left">&nbsp;C&oacute;digo Central:</td>
	<td align="left">
	&nbsp;<span><c:out value="${sessionScope.clienteSession.codigoCentral}"/></span>
	</td>
	</tr>
	
	<tr>
	<td align="left">&nbsp;Score Buro:</td>
	<td align="left">
	&nbsp;<span><c:out value="${sessionScope.clienteSession.grupoBuro}"/></span>
	</td>
	</tr>
	
	<tr>
	<td align="left">&nbsp;Endeudamiento:</td>
	<td align="left">
	&nbsp;<span><c:out value="${sessionScope.clienteSession.porcentEndeudamiento}"/>&nbsp;%</span>
	</td>
	</tr>
	
	<tr>
	<td align="left">&nbsp;Clasificación BBVA:</td>
	<td align="left">
	&nbsp;<span><c:out value="${sessionScope.clienteSession.clasificacionBBVA}"/></span>
	</td>
	</tr>
	
	<tr>
	<td align="left">&nbsp;Clasificación S. Financiero:</td>
	<td align="left">
	&nbsp;<span><c:out value="${sessionScope.clienteSession.clasificacionSF}"/></span>
	</td>
	</tr>

	<tr>
	<td align="left">&nbsp;Fecha de Evaluación:</td>
	<td align="left">
	&nbsp;<span><c:out value="${sessionScope.clienteSession.fechaEvaluacion}"/></span>
	</td>
	</tr>

	<tr>
	<td align="left">&nbsp;Flujo Operativo:</td>
	<td align="left">
	&nbsp;<span><c:out value="${sessionScope.clienteSession.flujoOperativo}"/></span>
	</td>
	</tr>
	
<!-- 

				var clasifBBVA = changeValueIsBlank(data.cliente.clasificacionBBVA);
				var numDocumento = changeValueIsBlank(data.cliente.numeroDocumento);
				var fecEvaluacion = changeValueIsBlank(data.cliente.fechaEvaluacion);
				var clasifFinanciero = changeValueIsBlank(data.cliente.clasificacionSF);
				var sobreEndeudamiento = changeValueIsBlank(data.cliente.porcentEndeudamiento);
				var flujoOperativo = changeValueIsBlank(data.cliente.flujoOperativo);
 -->
	
	<tr>
	<td align="left">&nbsp;Segmento (Campaña):</td>
	<td align="left">
	&nbsp;<span><c:out value="${command.segmentoCampania}"/></span>
	</td>
	</tr>
	
--%>

	<tr>
	<td colspan="2">
	<table id="tblDatosGenerales"></table>
	</td>
	</tr>
	
	<tr><td colspan="2"><br /></td></tr>
	
	<tr>
		<td bgcolor="#ffffcc" style="border: 1px solid #ccccaa;">
		<span id="disclaimer"></span>
		</td>
	</tr>
	<tr>
		<td style="border: 1px solid #ccccaa; font-size: 16px; color: maroon;" align="right">
	  	<span id="clienteReevaluado"></span>
		</td>
	</tr>
	
	<tr><td colspan="2"><br /></td></tr>
	
	<tr>
	<td colspan="2">
		<table id="tblDatosOfertaProducto" border="1" width="100%">
			<tr>
				<td colspan="4" bgcolor="#0066bb"><font face="Arial Narrow" size=3 color="#FFFFFF"><b>DATOS DE LA OFERTA DEL PRODUCTO</b></font></td>
			</tr>
			<tr>
				<td bgcolor="#0066bb" width=20%><font face="Arial Narrow" size=3 color="#FFFFFF">Producto:</font></td>
				<td width=30% colspan="3"><font face="Arial Narrow" size=3 color="#000080"><b><c:out value="${command.desProducto}"/></b></font></td>
			</tr>
			<tr>
				<td bgcolor="#0066bb" width=20%><font face="Arial Narrow" size=3 color="#FFFFFF">Sub-Producto:</font></td>
				<td width=30% colspan="3"><font face="Arial Narrow" size=3 color="#000080"><b><c:out value="${command.desSubProducto}"/></b></font></td>
			</tr>
			<tr>
				<td bgcolor="#0066bb" width=20%><font face="Arial Narrow" size=3 color="#FFFFFF">Divisa:</font></td>
				<td width=30%><font face="Arial Narrow" size=3 color="#000080"><b><c:out value="${command.divisa}"/></b></font></td>
				<td bgcolor="#0066bb" width=20%><font face="Arial Narrow" size=3 color="#FFFFFF">Importe:</font></td>
				<td width=30%><font face="Arial Narrow" size=3 color="#000080"><b><c:out value="${command.importe}"/></b></font></td>
			</tr>
			<c:if test="${command.familia ne FAMILIA_TARJETAS}">
			<tr>
				<td bgcolor="#0066bb" width=20%><font face="Arial Narrow" size=3 color="#FFFFFF">Tasa:</font></td>
				<td width=30%><font face="Arial Narrow" size=3 color="#000080"><b><c:out value="${command.tasa}"/>&nbsp;%</b></font></td>
				<td bgcolor="#0066bb" width=20%><font face="Arial Narrow" size=3 color="#FFFFFF">Plazo:</font></td>
				<td width=30%><font face="Arial Narrow" size=3 color="#000080"><b><c:out value="${command.plazo}"/>&nbsp;meses</b></font></td>
			</tr>
			<tr>
				<td bgcolor="#0066bb" width=20%><font face="Arial Narrow" size=3 color="#FFFFFF">Cuota Aproximada:</font></td>
				<td colspan="3"><font face="Arial Narrow" size=3 color="#000080"><b><c:out value="${command.cuotaTCEA}"/></b></font></td>
			</c:if>
		</table>
	</td>
	</tr>
	
</table>

</html:form>
</body>
<script type="text/javascript">
	document.getElementById("tblDatosGenerales").outerHTML = window.opener.document.getElementById("tblDatosGenerales").outerHTML;
	<c:if test="${command.familia ne FAMILIA_TARJETAS}">
	document.getElementById("disclaimer").outerHTML = window.opener.document.getElementById("disclaimer").outerHTML;
	</c:if>
	document.getElementById("clienteReevaluado").outerHTML = window.opener.document.getElementById("clienteReevaluado").outerHTML;
	window.print();
	window.setTimeout(function(){window.close();}, 4000);
</script>
</html>